/*
 *  $Id: WarIllusion.cs 1221 2010-11-30 16:54:52Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Light.Abilities {
    public class WarIllusion: AbilityCard<int> {
        public WarIllusion(): base("001_l_a_war_illusion") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Light;
            Target = SummonTarget.Summon;
        }

        protected override void DoAction(TargetArgs<int> args) {
            CreatureCard card = new WarIllusionCreature();
            Creature cr = new Creature(args.Player, card);
            args.Player.SummonCreature(cr, args.Target);
        }

        private class WarIllusionCreature: CreatureCard {
            public WarIllusionCreature(): base("001_l_c_war_illusion") {
                Level = CompleteLevel.ReadyForTest;
                SetPictureSource<WarIllusion>();
                Element = ElementType.Light;
                MaxCount = 0;
                Damage = 0;
                Health = 1;
            }

            public override void SetNaturalAffects(ICollector<Affect> affects) {
                affects.Add<Affects.Lifeless>();
                affects.Add<Affects.FlightBlock>();
                affects.Add<Affects.DisableAttack>();
            }
        }
    }
}
